#ifndef SCENESLIDER_H
#define SCENESLIDER_H

#include <qqtlongclickwidget.h>
#include <qqtdictionary.h>

class LingWidget : public QQtLongClickWidget
{
    Q_OBJECT
public:
    explicit LingWidget ( QWidget* parent = 0 ) : QQtLongClickWidget ( parent ) {
        mColor = QColor ( Qt::black );
    }

    QColor color() {
        return mColor;
    }

    void setColor ( QColor color ) {
        mColor = color;
        update();
    }

    // QWidget interface
protected:
    virtual void paintEvent ( QPaintEvent* event ) override;

private:
    QColor mColor;
};

class SceneSlider : public QQtLongClickWidget
{
    Q_OBJECT
public:
    explicit SceneSlider ( QWidget* parent = nullptr );

signals:
    //去修改菱形的color
    void lingClicked ( LingWidget* );

public slots:

protected slots:
    //add ling xing
    void longClicked ( QPoint );
    void slotLingClicked();

    //ling long clicked
    void deleteLing ( );
private:
    QQtDictionary mLingNode;
    QQtDictionary mLingNode2;//start stop
    //"color" QRgb
    //"pos" QPoint
    //"widget" QWidget*

    // QWidget interface
protected:
    virtual void paintEvent ( QPaintEvent* event ) override;
};

#endif // SCENESLIDER_H
